package com.woniu.day8.pojo;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;


import java.util.Date;
import java.util.List;


/**
 *
 * @TableName t_menu
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_menu")
public class Menu implements Serializable {

    /**
     * 菜单id
     */
    @TableId(value = "mid" ,type = IdType.AUTO)
    private Integer mid;
    /**
     * 父级菜单id
     */

    private Integer pid;
    /**
     * 菜单名称
     */

    private String mname;
    /**
     * 显示的图标
     */

    private String icon;
    /**
     * vue跳转页面路由(url)
     */

    private String route;
    /**
     * 菜单的排列序号
     */

    private Integer sortid;
    /**
     * 创建时间
     */
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern= "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createtime;
    /**
     * 修改时间
     */
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern= "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatetime;
    @TableField(exist = false)
    private List<Menu> children;


}
